3.904 \(\int \frac{1}{a-b+2 a x^2+a x^4} \, dx\)

Optimal. Leaf size=109 \[ \frac{\tan ^{-1}\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a}-\sqrt{b}}}\right )}{2 \sqrt [4]{a} \sqrt{b} \sqrt{\sqrt{a}-\sqrt{b}}}-\frac{\tan ^{-1}\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a}+\sqrt{b}}}\right )}{2 \sqrt [4]{a} \sqrt{b} \sqrt{\sqrt{a}+\sqrt{b}}} \]

[Out]

ArcTan[(a^(1/4)*x)/Sqrt[Sqrt[a] - Sqrt[b]]]/(2*a^(1/4)*Sqrt[Sqrt[a] - Sqrt[b]]*S
qrt[b]) - ArcTan[(a^(1/4)*x)/Sqrt[Sqrt[a] + Sqrt[b]]]/(2*a^(1/4)*Sqrt[Sqrt[a] +
Sqrt[b]]*Sqrt[b])

_______________________________________________________________________________________

Rubi [A]  time = 0.118191, antiderivative size = 109, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111 \[ \frac{\tan ^{-1}\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a}-\sqrt{b}}}\right )}{2 \sqrt [4]{a} \sqrt{b} \sqrt{\sqrt{a}-\sqrt{b}}}-\frac{\tan ^{-1}\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a}+\sqrt{b}}}\right )}{2 \sqrt [4]{a} \sqrt{b} \sqrt{\sqrt{a}+\sqrt{b}}} \]

Antiderivative was successfully verified.

[In]  Int[(a - b + 2*a*x^2 + a*x^4)^(-1),x]

[Out]

ArcTan[(a^(1/4)*x)/Sqrt[Sqrt[a] - Sqrt[b]]]/(2*a^(1/4)*Sqrt[Sqrt[a] - Sqrt[b]]*S
qrt[b]) - ArcTan[(a^(1/4)*x)/Sqrt[Sqrt[a] + Sqrt[b]]]/(2*a^(1/4)*Sqrt[Sqrt[a] +
Sqrt[b]]*Sqrt[b])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 17.7047, size = 94, normalized size = 0.86 \[ - \frac{\operatorname{atan}{\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a} + \sqrt{b}}} \right )}}{2 \sqrt [4]{a} \sqrt{b} \sqrt{\sqrt{a} + \sqrt{b}}} + \frac{\operatorname{atan}{\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a} - \sqrt{b}}} \right )}}{2 \sqrt [4]{a} \sqrt{b} \sqrt{\sqrt{a} - \sqrt{b}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/(a*x**4+2*a*x**2+a-b),x)

[Out]

-atan(a**(1/4)*x/sqrt(sqrt(a) + sqrt(b)))/(2*a**(1/4)*sqrt(b)*sqrt(sqrt(a) + sqr
t(b))) + atan(a**(1/4)*x/sqrt(sqrt(a) - sqrt(b)))/(2*a**(1/4)*sqrt(b)*sqrt(sqrt(
a) - sqrt(b)))

_______________________________________________________________________________________

Mathematica [A]  time = 0.111674, size = 105, normalized size = 0.96 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{a} x}{\sqrt{a-\sqrt{a} \sqrt{b}}}\right )}{2 \sqrt{b} \sqrt{a-\sqrt{a} \sqrt{b}}}-\frac{\tan ^{-1}\left (\frac{\sqrt{a} x}{\sqrt{\sqrt{a} \sqrt{b}+a}}\right )}{2 \sqrt{b} \sqrt{\sqrt{a} \sqrt{b}+a}} \]

Antiderivative was successfully verified.

[In]  Integrate[(a - b + 2*a*x^2 + a*x^4)^(-1),x]

[Out]

ArcTan[(Sqrt[a]*x)/Sqrt[a - Sqrt[a]*Sqrt[b]]]/(2*Sqrt[a - Sqrt[a]*Sqrt[b]]*Sqrt[
b]) - ArcTan[(Sqrt[a]*x)/Sqrt[a + Sqrt[a]*Sqrt[b]]]/(2*Sqrt[a + Sqrt[a]*Sqrt[b]]
*Sqrt[b])

_______________________________________________________________________________________

Maple [A]  time = 0.014, size = 74, normalized size = 0.7 \[ -{\frac{a}{2}\arctan \left ({ax{\frac{1}{\sqrt{ \left ( \sqrt{ab}+a \right ) a}}}} \right ){\frac{1}{\sqrt{ab}}}{\frac{1}{\sqrt{ \left ( \sqrt{ab}+a \right ) a}}}}-{\frac{a}{2}{\it Artanh} \left ({ax{\frac{1}{\sqrt{ \left ( \sqrt{ab}-a \right ) a}}}} \right ){\frac{1}{\sqrt{ab}}}{\frac{1}{\sqrt{ \left ( \sqrt{ab}-a \right ) a}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/(a*x^4+2*a*x^2+a-b),x)

[Out]

-1/2/(a*b)^(1/2)/(((a*b)^(1/2)+a)*a)^(1/2)*arctan(x*a/(((a*b)^(1/2)+a)*a)^(1/2))
*a-1/2/(a*b)^(1/2)/(((a*b)^(1/2)-a)*a)^(1/2)*arctanh(x*a/(((a*b)^(1/2)-a)*a)^(1/
2))*a

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{1}{a x^{4} + 2 \, a x^{2} + a - b}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a*x^4 + 2*a*x^2 + a - b),x, algorithm="maxima")

[Out]

integrate(1/(a*x^4 + 2*a*x^2 + a - b), x)

_______________________________________________________________________________________

Fricas [A]  time = 0.282818, size = 747, normalized size = 6.85 \[ -\frac{1}{4} \, \sqrt{-\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b - b^{2}}} \log \left ({\left (b - \frac{a^{2} b - a b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}}\right )} \sqrt{-\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b - b^{2}}} + x\right ) + \frac{1}{4} \, \sqrt{-\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b - b^{2}}} \log \left (-{\left (b - \frac{a^{2} b - a b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}}\right )} \sqrt{-\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b - b^{2}}} + x\right ) - \frac{1}{4} \, \sqrt{\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b - b^{2}}} \log \left ({\left (b + \frac{a^{2} b - a b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}}\right )} \sqrt{\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b - b^{2}}} + x\right ) + \frac{1}{4} \, \sqrt{\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b - b^{2}}} \log \left (-{\left (b + \frac{a^{2} b - a b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}}\right )} \sqrt{\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b - b^{2}}} + x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a*x^4 + 2*a*x^2 + a - b),x, algorithm="fricas")

[Out]

-1/4*sqrt(-((a*b - b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3) + 1)/(a*b - b^2))*log((b
 - (a^2*b - a*b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3))*sqrt(-((a*b - b^2)/sqrt(a^3*
b - 2*a^2*b^2 + a*b^3) + 1)/(a*b - b^2)) + x) + 1/4*sqrt(-((a*b - b^2)/sqrt(a^3*
b - 2*a^2*b^2 + a*b^3) + 1)/(a*b - b^2))*log(-(b - (a^2*b - a*b^2)/sqrt(a^3*b -
2*a^2*b^2 + a*b^3))*sqrt(-((a*b - b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3) + 1)/(a*b
 - b^2)) + x) - 1/4*sqrt(((a*b - b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3) - 1)/(a*b
- b^2))*log((b + (a^2*b - a*b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3))*sqrt(((a*b - b
^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3) - 1)/(a*b - b^2)) + x) + 1/4*sqrt(((a*b - b^
2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3) - 1)/(a*b - b^2))*log(-(b + (a^2*b - a*b^2)/s
qrt(a^3*b - 2*a^2*b^2 + a*b^3))*sqrt(((a*b - b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3
) - 1)/(a*b - b^2)) + x)

_______________________________________________________________________________________

Sympy [A]  time = 1.96923, size = 63, normalized size = 0.58 \[ \operatorname{RootSum}{\left (t^{4} \left (256 a^{2} b^{2} - 256 a b^{3}\right ) + 32 t^{2} a b + 1, \left ( t \mapsto t \log{\left (- 64 t^{3} a^{2} b + 64 t^{3} a b^{2} - 4 t a - 4 t b + x \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a*x**4+2*a*x**2+a-b),x)

[Out]

RootSum(_t**4*(256*a**2*b**2 - 256*a*b**3) + 32*_t**2*a*b + 1, Lambda(_t, _t*log
(-64*_t**3*a**2*b + 64*_t**3*a*b**2 - 4*_t*a - 4*_t*b + x)))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.687337, size = 1, normalized size = 0.01 \[ \mathit{Done} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a*x^4 + 2*a*x^2 + a - b),x, algorithm="giac")

[Out]

Done